package com.zhu.esyblog.controller;


import com.zhu.esyblog.pojo.RespBean;
import com.zhu.esyblog.service.IArticleBodyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author stx
 * @since 2022-06-22
 */
@RestController
@RequestMapping("/articles")
@Api(tags = "文章详细内容模块")
public class ArticleBodyController {
    @Autowired
    private IArticleBodyService articleBodyService;

    @PostMapping("article/view/{id}")
    @ApiOperation(value = "文章详细内容")
    public RespBean  findArticleById(@PathVariable("id")Long articleId){
        return articleBodyService.findArticleById(articleId);
    }
}
